import request from '@/utils/request'


// 修改消息为已读
export function updateRead(id) {
  return request({
    url: '/project/info/updateRead/' + id,
    method: 'put',
  })
}
// 查询聊天信息列表
export function selectUserChat(chatUserId) {
  return request({
    url: '/project/info/selectUserChat/'+chatUserId,
    method: 'get',
  })
}
// 查询聊天信息列表
export function listInfo(query) {
  return request({
    url: '/project/info/list',
    method: 'get',
    params: query
  })
}

// 查询聊天信息详细
export function getInfo(id) {
  return request({
    url: '/project/info/' + id,
    method: 'get'
  })
}

// 新增聊天信息
export function addInfo(data) {
  return request({
    url: '/project/info',
    method: 'post',
    data: data
  })
}

// 修改聊天信息
export function updateInfo(data) {
  return request({
    url: '/project/info',
    method: 'put',
    data: data
  })
}

// 删除聊天信息
export function delInfo(id) {
  return request({
    url: '/project/info/' + id,
    method: 'delete'
  })
}
